<?php

namespace app\admin\model\fm;

use think\Model;

/**
 * Accountgroups
 */
class Accountgroups extends Model
{
    // 表主键
    protected $pk = 'groupname';
    
    // 表名
    protected $name = 'fm_accountgroups';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;


    public function sectioninaccountsTable(): \think\model\relation\BelongsTo
    {
        return $this->belongsTo(\app\admin\model\fm\Accountsection::class, 'sectioninaccounts', 'sectionid');
    }

    public function parentgroupnameTable(): \think\model\relation\BelongsTo
    {
        return $this->belongsTo(\app\admin\model\fm\Accountgroups::class, 'parentgroupname', 'groupname');
    }
}